import threading
import time

def test():
    for i in range(0,5):
        print('test',i)
        time.sleep(1)

x=threading.Thread(target=test)
x.start()

for i in range(5):
    print('main',i)
    time.sleep(1)
